/*
 * @Description: 
 * @Author: 于子续
 * @Date: 2024-09-03 15:54:17
 * @LastEditors: 于子续
 * @LastEditTime: 2024-09-03 16:01:51
 */
package day07;

public class Test11_PrintDiamond {
    public static void main(String[] args) {


        int rows = 4, q = 3;
        for (int i = 0; i < rows; i++) {
            for (int z = q; z >= 0; z--) {
                System.out.print(" ");
            }

            for (int j = 1; j <= (i * 2) + 1; j++) {
                System.out.print("*");
            }
            q--;
            System.out.println();
        }
        q = 1;
        for (int i = 3; i > 0; i--) {
            for (int z = q; z >= 0; z--) {
                System.out.print(" ");
            }

            for (int j = 1; j <= (i * 2) - 1; j++) {
                System.out.print("*");
            }
            q++;
            System.out.println();
            
        }

    }
}
